package com.yonyou.cms.epc.client.entity.file;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cms.wms.client.entity.IBasePO;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;

/**
 * <p>
 *
 * </p>
 *
 * @author zhouzijian
 * @since 2020-12-29
 */
@TableName("tt_file")
public class FilePO extends IBasePO<FilePO> {


    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;
    /**
     * 附件类型
     */
    @TableField("XTFJLX")
    private String xtfjlx;
    /**
     * 附件名称
     */
    @TableField("XTWJMC")
    private String xtwjmc;
    /**
     * 附件路径
     */
    @TableField("XTWJLJ")
    private String xtwjlj;
    /**
     * 单据ID
     */
    @TableField("XTDJID")
    private Long xtdjid;

    @TableField("SERIAL_NUM")
    private Long serialNum;
    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    private Boolean isDeleted;
    @TableField("ORG_ID")
    private String orgId;
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    @TableField("OWNER_CODE")
    private String ownerCode;
    @TableField("COMPANY_CODE")
    private String companyCode;
    @TableField("IS_APP")
    private Integer isApp;
    @TableField("APP_ID")
    private String appId;

    public FilePO() {
        super();
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getXtfjlx() {
        return xtfjlx;
    }

    public void setXtfjlx(String xtfjlx) {
        this.xtfjlx = xtfjlx;
    }

    public String getXtwjmc() {
        return xtwjmc;
    }

    public void setXtwjmc(String xtwjmc) {
        this.xtwjmc = xtwjmc;
    }

    public String getXtwjlj() {
        return xtwjlj;
    }

    public void setXtwjlj(String xtwjlj) {
        this.xtwjlj = xtwjlj;
    }

    public Long getXtdjid() {
        return xtdjid;
    }

    public void setXtdjid(Long xtdjid) {
        this.xtdjid = xtdjid;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Long getSerialNum() {
        return serialNum;
    }

    public void setSerialNum(Long serialNum) {
        this.serialNum = serialNum;
    }

    @Override
    public String toString() {
        return "FilePO{" +
                "id=" + id +
                ", xtfjlx=" + xtfjlx +
                ", xtwjmc=" + xtwjmc +
                ", xtwjlj=" + xtwjlj +
                ", xtdjid=" + xtdjid +
                ", isDeleted=" + isDeleted +
                ", orgId=" + orgId +
                ", ownerParCode=" + ownerParCode +
                ", ownerCode=" + ownerCode +
                ", companyCode=" + companyCode +
                ", isApp=" + isApp +
                "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author zhouzijian
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "id");
    }
}
